<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp"%>
<%@ include file="RolePowerManager.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
  <script type="text/javascript" src="${ctx}/js/jquery-1.7.2.js"></script>
  <script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  <script type='text/javascript' src='${ctx}/dwr/interface/TeacherManager.js'></script>
	<script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
	<script type='text/javascript' src='${ctx}/dwr/util.js'></script>
  	<script type="text/javascript" src="${ctx}/js/Train/TeacherManager.js"  charset="UTF-8"></script>
  <link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>    
  <link rel="stylesheet" href="${ctx}/css/Train/floatdiv.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/Train/TeacherManager.css" type="text/css"></link>
  </head>
 <script type="text/javascript">
 	$(function()
	{
	 	$("#serchtype").val('${serchtype}');
	});
 </script>
  <body>
    <div class="head">
  	<div class="curloc"><span>当前位置: 教育培训 >> 培训课程维护</span></div> 	
  	</div>
  	<form action="FindTeacherServlet" method="post" id="searchform">
	  <div class="query">
	  <div class="querytype">
	  
	  	<label>查询条件：</label>
	  	<select class="queryselect" name="serchtype" id="serchtype">
			<option value="teachername">
			讲师姓名
			</option >
			<option value="teacherid">
			讲师编号
			</option>
		</select>		
		<input class="queryinput" type="text" name="keycode" id="keycode"/>
	  </div>
	  <div class="querytime">
	  
	  	<div class="querybtn" onclick="search()">
	  		<span class="STYLE1"><img src="${ctx}/images/a1.gif" width="9" height="9" /></span>
            <span class="STYLE1"> </span><a style="cursor: pointer;">查询</a><span class="STYLE1"></span>
	  	</div>
      </div>
      
      <div style="float: right; padding-right: 20px">
	  			<span class="STYLE1"><img src="${ctx}/images/001.gif" width="9" height="9" /></span>
            	<span class="STYLE1"> </span><a href="#" onclick="popadd()">新增</a><span class="STYLE1"></span>
	  	</div>
	  <div class="clear"> </div>
	  </div>
    </form>
        <div id="main">
    <table id="detail_t">
    	<tr>
    		<th>序号</th>
    		<th>讲师编号</th>
    		<th>讲师姓名</th>
    		<th>更多操作</th>
    		
    	</tr>
    	    <c:forEach items="${page.list}" var="t" varStatus="status">
    <tr>
    	<td>${status.count}</td>
    	<td>${t.id}</td>
    	<td>${t.name}</td>
    	<td>
    	<div align="center">
            <span class="STYLE1"><img src="${ctx}/images/037.gif" width="9" height="9" /></span>
            <span class="STYLE1"> [</span><a href="#" onclick="clickUpdateTeacher('${t.id}')">详情/修改</a><span class="STYLE1">]</span>
            &nbsp;&nbsp;&nbsp;
            <span class="STYLE2"><img src="${ctx}/images/010.gif" width="9" height="9" /></span>
            <span class="STYLE2"> </span><span class="STYLE1">[</span><a href="#" onclick="deleteTeacher('${t.id}')">删除</a><span class="STYLE1">]</span>
            </div>
    	</td>
    </tr>
    </c:forEach>
    </table>
 
      <div class="manu">共${page.totalCount}条记录当前第<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
				 <a href="FindTeacherServlet?pageNo=${1}">首页</a>
				  <a href="FindTeacherServlet?pageNo=${page.pageNo-1}">上一页</a>
				  <a href="FindTeacherServlet?pageNo=${page.pageNo+1}">下一页</a>
				  <a href="FindTeacherServlet?pageNo=${page.pageCount}">末页</a> 每页显示
				  <input type="text" name="pageSize"  id="pageSize" size="4"/>条
				  <input type="submit" value="提交" class="submitbuttton" onclick="changePageSize()"/> 
			</div>
		</div>   
		
	   
    <div id="AddTeacher_div">
	<div  class="div_head" id="AddTeacher_head">
    <span class="div_title">添加讲师</span>
    <span><a class="div_close" onclick="hideDiv('AddTeacher_div');" title="close">X</a></span>
    </div>
    <div class="AddTeacher_body" id="AddCourse_body" >
    <table id="detail_t" width="100%">
    <tr>
   		<td> 讲师姓名：</td>
   		<td><input type="text" id="inputTeachername" size="20"></td>
    </tr>
    <tr>
   		<td class="btn" colspan="2" ><span style="float: right;margin-right: 20px"><input type="button" onclick="addTeacher()" value="添加"></span></td>
    </tr>
    
    </table>
    </div>
    </div>  
    <div id="updateTeacher_div" >
	<div id="updateTeacher_head" class="div_head">
    <span  class="div_title">讲师修改</span>
    <span><a  class="div_close" onclick="hideDiv('updateTeacher_div');" title="close">X</a></span>
    </div>
    <div id="updateTeacher_box_body" >
    	<table id="detail_t" width="100%"> 
    	<tr>
   		<td> 讲师编号：</td>
   		<td id="TeacherId"></td>
    	</tr>	
    		<tr>    		
    			<td><input type="hidden" id="teacherid" value=""/>讲师姓名：</td>
    			
    			<td><input type="text" id="teachername" value=""/></td>    			
    		</tr>
    		<tr>
    		<td class="btn" colspan="2" >
    		<span style="float: right;margin-right: 20px;">
    		<input type="button" value="修改" onclick="updateTeacher()" >
    		</span>
    		</td>
    		</tr>
    	</table>
    </div>
	</div>
  </body>
</html>
